<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="description" content=""/>
    <meta name="author" content=""/>
    <title>后台管理系统</title>
</head>
<!-- DataTables CSS -->
<link href="/assets/vendor/datatables-plugins/dataTables.bootstrap.css" th:href="@{/assets/vendor/datatables-plugins/dataTables.bootstrap.css}" rel="stylesheet"/>
<!-- DataTables Responsive CSS -->
<link href="/assets/vendor/datatables-responsive/dataTables.responsive.css" th:href="@{/assets/vendor/datatables-responsive/dataTables.responsive.css}" rel="stylesheet"/>
<link rel="stylesheet" href="/js/home/jquery-ui.css" th:href="@{/js/home/jquery-ui.css}"/>
<style>
    .form-group {
        width:300px;
    }
</style>

<body>
<div id="wrapper">
    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
        <!-- head 头部 -->
        <div id="head" th:include="common/header :: copy"></div>
        <!--tree菜单 -->
        <div id="tree" th:replace="common/tree :: copy"></div>
    </nav>

    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">添加酒店信息</h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        添加酒店信息
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                            <form id="uploadForm" name="uploadForm" method="POST" enctype="multipart/form-data"  class="form-horizontal" action="../hotel/upload" role="form">
                                <div class="modal-body">
                                    <div class="panel-body">
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <input  name="id" hidden="hidden" th:value="${hotel==null}? '' : ${hotel.id}"/>
                                                <div class="form-group">
                                                    <label>名称</label>
                                                    <input class="form-control" placeholder="名称" name="title" th:value="${hotel==null}? '' : ${hotel.title}"/>
                                                </div>
                                                <div class="form-group">
                                                    <label>说明</label>
                                                    <input class="form-control" placeholder="说明" name="detail" th:value="${hotel==null}? '' : ${hotel.detail}"/>
                                                </div>
                                                <div class="form-group">
                                                    <label>价格</label>
                                                    <input class="form-control" placeholder="价格" name="price" th:value="${hotel==null}? '' : ${hotel.price}"/>
                                                </div>
                                                <div class="form-group">
                                                    <label>入住时间</label>
                                                    <input class="form-control" placeholder="入住时间" name="day" th:value="${hotel==null}? '' : ${hotel.day}"/>
                                                </div>
                                                <div class="form-group">
                                                    <label>地址</label>
                                                    <input class="form-control" placeholder="地址" name="address" th:value="${hotel==null}? '' : ${hotel.address}"/>
                                                </div>
                                                <div class="form-group">
                                                    <label>床型</label>
                                                    <input class="form-control" placeholder="床型" name="bed" th:value="${hotel==null}? '' : ${hotel.bed}"/>
                                                </div>
                                                <div class="form-group">
                                                    <label>星级</label>
                                                    <input class="form-control" placeholder="星级" name="star" th:value="${hotel==null}? '' : ${hotel.star}"/>
                                                </div>
                                                <div class="form-group">
                                                    <label>图片</label>
                                                    <input type="file" name="file" id="file" accept=".jpg,.jpeg,.png,.bmp" multiple="multiple" onchange="preImg(this.id,'photo');"/>
                                                    <br />
                                                    <br />
                                                    <img id="photo" src="" width="200px" height="80px" style="display: none;" />
                                                </div>
                                            </div>
                                            <!-- /.col-lg-6 (nested) -->
                                            <!-- /.col-lg-6 (nested) -->
                                        </div>
                                        <!-- /.row (nested) -->
                                    </div>
                                    <!-- /.panel-body -->
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <button type="submit" class="btn btn-primary">保存</button>
                                </div>
                            </form>
                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <!-- /.col-lg-12 -->
        </div>

    </div>
    <!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->
<div id="footer" th:replace="common/footer :: copy"></div>


<!-- DataTables JavaScript -->
<script src="/assets/vendor/datatables/js/jquery.dataTables.min.js" th:src="@{/assets/vendor/datatables/js/jquery.dataTables.min.js}"></script>
<script type="text/javascript" src="/js/home/jquery-ui.js" th:src="@{/js/home/jquery-ui.js}"></script>
<script src="/assets/vendor/datatables-plugins/dataTables.bootstrap.min.js" th:src="@{/assets/vendor/datatables-plugins/dataTables.bootstrap.min.js}"></script>
<script src="/assets/vendor/datatables-responsive/dataTables.responsive.js" th:src="@{/assets/vendor/datatables-responsive/dataTables.responsive.js}"></script>
<script type="text/javascript" src="../componets/admin/hotel.js" ></script>

</body>

</html>
